import {Component} from "@angular/core";
import {SidebarComponent} from "./sidebar.component";
import {Product} from "./entity/product";
import {ProductService} from "./service/product.service";
import {ProductComponent} from "./product.component";
/**
 * Created by Administrator on 2016/8/2.
 */
@Component({
    selector:"my-body",
    templateUrl:"./app/body.html",
    directives:[SidebarComponent,ProductComponent],
    providers:[ProductService]
})
export class BodyComponent{
    private productList:Product[];
    private productService:ProductService;

    constructor(productService:ProductService) {
        this.productService = productService;
        this.productList = productService.getAll();
    }
}